app.service("orderService",function($http){
	
	
	//得到订单
	this.getorder=function(){
		return $http({
				method : "POST",
				url : "/test/getOrder"
					
		});
	}
	
	//修改订单
	this.submitOrder=function(orderid,product,username,statue){
		return $http({
				method : "POST",
				url : "/test/submitOrder",
				data:{
					'id':orderid,
					'product':product,
					'username':username,
					'statue':statue
				}
					
		});
	}
	
	//添加订单
	this.addOrder=function(product,username,statue){
		return $http({
				method : "POST",
				url : "/test/addOrder",
				data:{
					'product':product,
					'username':username,
					'statue':statue
				}
					
		});
	}
	
	//删除订单
	this.deleted=function(orderid,product,username,statue){
		return $http({
				method : "POST",
				url : "/test/deleted",
				data:{
					'id':orderid,
					'product':product,
					'username':username,
					'statue':statue
				}
					
		});
	}
	
	
	
	
	
	
	
})